package gui;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Toolkit;

import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JWindow;
import javax.swing.border.LineBorder;

import util.MyFactory;

/** 闪屏 */
public class WelcomeWindow extends JWindow {
	public final int HEIGHT = Toolkit.getDefaultToolkit().getScreenSize().height;
	public final int WEIGHT = Toolkit.getDefaultToolkit().getScreenSize().width;
	private static final long serialVersionUID = -2970626103134592561L;

	public WelcomeWindow() {
		init();
	}

	private void init() {
		setSize(430, 300);
		setLocation((WEIGHT - 430) / 2, (HEIGHT - 300) / 2);
		JPanel pane = new JPanel(new BorderLayout());
		ImageIcon ico = MyFactory.getImageIcon("welcome.png");
		JLabel l = new JLabel(ico);
		pane.add(BorderLayout.CENTER, l);
		pane.setBorder(new LineBorder(Color.GRAY));
		setContentPane(pane);
	}

}
